package org.hanbo.code.repository.action;

public class PageViewAction
	extends CodeSnippetActionBase
{
	private static final long serialVersionUID
		= -2624209219974793149L;

	public String execute()
	{
		if (!checkLogin())
		{
			return super.getCurrentStageValue();
		}
		
		if (!super.checkRegistration())
		{
			return super.getCurrentStageValue();
		}
		
		return SUCCESS;
	}
	
	public String getUserName()
	{
		return super.getLoggedInUser().getNickname();
	}

	public String getLogoutUrl()
	{
		return super.createLogOutLink("../index.action");
	}
}
